package cn.iocoder.yudao.module.blog.convert.base;

import cn.iocoder.yudao.module.blog.controller.app.base.MemberRespVO;
import cn.iocoder.yudao.module.blog.convert.module.BlogModuleConvert;
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface BlogConvert {
    BlogConvert INSTANCE = Mappers.getMapper(BlogConvert.class);

    default MemberRespVO covnertMember(MemberUserRespDTO memberUserRespDTO){
        if(memberUserRespDTO == null){
            return null;
        }

        MemberRespVO vo = new MemberRespVO();
        vo.setId(memberUserRespDTO.getId());
        vo.setAvatar(memberUserRespDTO.getAvatar());
        vo.setNickname(memberUserRespDTO.getNickname());
        vo.setMobile(memberUserRespDTO.getMobile());



        return vo;
    }
}
